<?php
class App_Validate_ConfirmPass extends Zend_Validate_Abstract
{
	//const NOT_AUTHORISED = 'notMatch';
	protected $_messageTemplates = array('notMatch'=> 'Password fields are not equal');
	public function isValid($value, $context = null)
	{
		$this->_setValue((string)$value);
		if(is_array($context)){
			if(!isset($context['passwordConf'])){
				return false;
			}
		}
		
		if($value != $context['passwordConf']){
			$this->_error('notMatch');
			return false;
		}
		else{
			return true;
		}		
	}
}